package com.sdp.flow.dto;

import java.io.Serializable;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sdp.core.bizc.annotation.ViewColumn;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author qcy
 * @since 2021-07-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("act_hi_procinst")
public class ActHiProcinstView extends Model<ActHiProcinstView> {

    private static final long serialVersionUID = 1L;

    @ViewColumn("a.ID_")
    private String id;

    @ViewColumn("a.REV_")
    private Integer rev;

    @ViewColumn("a.PROC_INST_ID_")
    private String procInstId;

    @ViewColumn("a.BUSINESS_KEY_")
    private String businessKey;

    @ViewColumn("a.PROC_DEF_ID_")
    private String procDefId;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ViewColumn("a.START_TIME_")
    private LocalDateTime startTime;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ViewColumn("a.END_TIME_")
    private LocalDateTime endTime;

    @ViewColumn("a.DURATION_")
    private Long duration;

    @ViewColumn("a.START_USER_ID_")
    private String startUserId;

    @ViewColumn("a.START_ACT_ID_")
    private String startActId;

    @ViewColumn("a.END_ACT_ID_")
    private String endActId;

    @ViewColumn("a.SUPER_PROCESS_INSTANCE_ID_")
    private String superProcessInstanceId;

    @ViewColumn("a.DELETE_REASON_")
    private String deleteReason;

    @ViewColumn("a.TENANT_ID_")
    private String tenantId;

    @ViewColumn("a.NAME_")
    private String name;

    @ViewColumn("a.CALLBACK_ID_")
    private String callbackId;

    @ViewColumn("a.CALLBACK_TYPE_")
    private String callbackType;

    @ViewColumn("a.REFERENCE_ID_")
    private String referenceId;

    @ViewColumn("a.REFERENCE_TYPE_")
    private String referenceType;
    
    /**
     * 模板名称
     */
    @ViewColumn("b.TEMPLATE_NAME")
    private String templateName;
    
    /**
     * 系统编号
     */
    @ViewColumn("b.SYSTEM_NO")
    private String systemNo;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
